$OpenBSD: patch-CMakeLists_txt,v 1.3 2014/11/01 21:09:42 zhuk Exp $
Fix detection of Akonadi.
--- CMakeLists.txt.orig	Sun Sep 28 03:21:42 2014
+++ CMakeLists.txt	Thu Oct 30 23:22:51 2014
@@ -1,5 +1,7 @@
 PROJECT(kimono)
 
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
+
 find_package(PkgConfig)
 find_package(KDE4 REQUIRED)
 find_package(Qyoto REQUIRED)
@@ -92,11 +94,13 @@ macro_optional_add_bindings(Soprano_FOUND "Soprano" so
 
 macro_optional_add_bindings(Nepomuk_FOUND "Nepomuk" nepomuk)
 
-if(KDEPIMLIBS_FOUND AND Akonadi_FOUND)
-    set(BUILD_Akonadi TRUE)
-else(KDEPIMLIBS_FOUND AND Akonadi_FOUND)
-    set(BUILD_Akonadi FALSE)
-endif(KDEPIMLIBS_FOUND AND Akonadi_FOUND)
+if(NOT DEFINED BUILD_Akonadi)
+    if(KDEPIMLIBS_FOUND AND Akonadi_FOUND)
+        set(BUILD_Akonadi TRUE)
+    else(KDEPIMLIBS_FOUND AND Akonadi_FOUND)
+        set(BUILD_Akonadi FALSE)
+    endif(KDEPIMLIBS_FOUND AND Akonadi_FOUND)
+endif(NOT DEFINED BUILD_Akonadi)
 macro_optional_add_bindings(BUILD_Akonadi "Akonadi" akonadi)
 
 macro_display_bindings_log()
